#ifndef __DRUG_EEPROM_H
#define __DRUG_EEPROM_H

#include "EEPROM.h"
#include "Type_def.h"
#include "string.h"
#include "stdio.h"

#define RECORD_ADDR  0x0000
#define TIME_ADDR    0x0001

typedef struct {
    u8 hour;
    u8 minute;
    u8 second;
} AlarmTime;

void EEPROM_init();
// 服药记录函数
void EEPROM_Write_Record(u8 flag);
u8 EEPROM_Read_Record(void);

// 闹钟时间函数
void EEPROM_Write_Time(AlarmTime time);
AlarmTime EEPROM_Read_Time(void);

#endif
